layui.config({
    base: '/js/modules/' //假设这是test.js所在的目录
});

layui.use('element', function(){

});